package com.ky.my.controller;


import com.ky.common.vo.R;
import com.ky.my.service.QuestionService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author hmt
 * @since 2024-06-19
 */
@RestController
@RequestMapping("/question")
public class QuestionController {
//    question/findAllQuestion
    @Autowired
    private QuestionService questionService;
    @RequestMapping("/findAllQuestion")
    public R findAll(){
        return questionService.findAll();
    }
    @RequestMapping("/findAllQuestionByType")
    public R findAllQuestionByType(@RequestParam("type")Integer type){
        return questionService.findAllQuestionByType(type);
    }

}

